package dao;

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;

public class CriaConexao {
	
	private static Connection con;

    public static Connection getConexao() throws ClassNotFoundException,
                    SQLException {

            if (con == null) {
                    Class.forName("org.firebirdsql.jdbc.FBDriver");
                    con = DriverManager.getConnection(
                                    "jdbc:firebirdsql:localhost/3050:c:/Users/User/Dropbox/Dados/FINAN.FDB?charSet=ISO8859_1",
                                    "SYSDBA", "hfrem");

            }
            return con;

            // "jdbc:firebirdsql:localhost/3050:d:\\Depart\\Dados\\DEPART.FDB"
            // "jdbc:firebirdsql:192.168.88.1:/var/firebird/DEPART.FDB"

    }
    
    public static void close() throws SQLException{
    	con.close();
    }


}
